home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / g_man / cat3 / OpenGL-ftn / fglcopytexsubimage2dext.z / fglcopytexsubimage2dext
Text File  |  1998-10-20  |  15KB  |  266 lines

  1.  
  2.  
  3.  
  4. ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT((((3333GGGG))))    OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee    ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT - copy pixels into a 2D texture subimage
  10.  
  11.  
  12. FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      SUBROUTINE ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT( INTEGER*4 _t_a_r_g_e_t,
  14.                                          INTEGER*4 _l_e_v_e_l,
  15.                                          INTEGER*4 _x_o_f_f_s_e_t,
  16.                                          INTEGER*4 _y_o_f_f_s_e_t,
  17.                                          INTEGER*4 _x,
  18.                                          INTEGER*4 _y,
  19.                                          INTEGER*4 _w_i_d_t_h,
  20.                                          INTEGER*4 _h_e_i_g_h_t )
  21.  
  22.  
  23. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  24.      _t_a_r_g_e_t   The target texture.  Must be GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____2222DDDD or
  25.               GGGGLLLL____DDDDEEEETTTTAAAAIIIILLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____2222DDDD____SSSSGGGGIIIISSSS.
  26.  
  27.      _l_e_v_e_l    The level-of-detail number.  Level 0 is the base image level.
  28.               Level _n is the _nth mipmap reduction image.
  29.  
  30.      _x_o_f_f_s_e_t  A texel offset in the x direction within the texture array.
  31.  
  32.      _y_o_f_f_s_e_t  A texel offset in the y direction within the texture array.
  33.  
  34.      _x        The x coordinate of the lower-left corner of the pixel rectangle
  35.               to be transferred to the texture array.
  36.  
  37.      _y        The y coordinate of the lower-left corner of the pixel rectangle
  38.               to be transferred to the texture array.
  39.  
  40.      _w_i_d_t_h    The width of the texture subimage.
  41.  
  42.      _h_e_i_g_h_t   The height of the texture subimage.
  43.  
  44. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  45.      ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT replaces a rectangular portion of a two-
  46.      dimensional texture image with pixels from the current GGGGLLLL____RRRREEEEAAAADDDD____BBBBUUUUFFFFFFFFEEEERRRR
  47.      (rather than from main memory, as is the case for ffffggggllllTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT).
  48.  
  49.      The screen-aligned pixel rectangle with lower-left corner at (_x, _y)
  50.      having width _w_i_d_t_h and height _h_e_i_g_h_t replaces the portion of the texture
  51.      array with x indices _x_o_f_f_s_e_t through _x_o_f_f_s_e_t+_w_i_d_t_h-1, inclusive, and y
  52.      indices _y_o_f_f_s_e_t through _y_o_f_f_s_e_t+_h_e_i_g_h_t-1, inclusive, at the mipmap level
  53.      specified by _l_e_v_e_l.  (But see the paragraph about GGGGLLLL____IIIINNNNTTTTEEEERRRRLLLLAAAACCCCEEEE____SSSSGGGGIIIIXXXX
  54.      below).
  55.  
  56.      The pixels in the rectangle are processed exactly as if ffffggggllllCCCCooooppppyyyyPPPPiiiixxxxeeeellllssss had
  57.      been called, but the process stops just before final conversion.  At this
  58.      point all pixel component values are clamped to the range [0, 1] and then
  59.      converted to the texture's internal format for storage in the texel
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT((((3333GGGG))))    OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee    ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT((((3333GGGG))))
  71.  
  72.  
  73.  
  74.      array.
  75.  
  76.      The destination rectangle in the texture array may not include any texels
  77.      outside the texture array as it was originally specified.  It is not an
  78.      error to specify a subtexture with zero width or height, but such a
  79.      specification has no effect.
  80.  
  81.      If any of the pixels within the specified rectangle of the current
  82.      GGGGLLLL____RRRREEEEAAAADDDD____BBBBUUUUFFFFFFFFEEEERRRR are outside the read window associated with the current
  83.      rendering context, then the values obtained for those pixels are
  84.      undefined.
  85.  
  86.      When GGGGLLLL____IIIINNNNTTTTEEEERRRRLLLLAAAACCCCEEEE____SSSSGGGGIIIIXXXX is enabled, successive rows of source pixels are
  87.      written to every other row in the texture subimage, rather than to every
  88.      successive row.  That is, row j or the source image is written to row
  89.      yoffset+2j of the destination texture, while rows
  90.      (yoffset+1,yoffset+3,...) are not modified.  A complete video frame may
  91.      be assembled in texture memory by invoking ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT on two
  92.      consecutive video fields, with _y_o_f_f_s_e_t values that differ by one.
  93.  
  94. NNNNOOOOTTTTEEEESSSS
  95.      ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT is part of the EEEEXXXXTTTT____ccccooooppppyyyy____tttteeeexxxxttttuuuurrrreeee extension, and
  96.      GGGGLLLL____IIIINNNNTTTTEEEERRRRLLLLAAAACCCCEEEE____SSSSGGGGIIIIXXXX is part of the SSSSGGGGIIIIXXXX____iiiinnnntttteeeerrrrllllaaaacccceeee extension.  See ffffggggllllIIIInnnnttttrrrroooo
  97.      for more information about using extensions.
  98.  
  99. EEEERRRRRRRROOOORRRRSSSS
  100.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated when _t_a_r_g_e_t is not one of the allowable
  101.      values.
  102.  
  103.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _l_e_v_e_l is less than zero or greater than
  104.      log (_m_a_x), where _m_a_x is the returned value of GGGGLLLL____MMMMAAAAXXXX____TTTTEEEEXXXXTTTTUUUURRRREEEE____SSSSIIIIZZZZEEEE.
  105.         2
  106.  
  107.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if xoffset<-TEXTURE_BORDER,
  108.      (xoffset+width)>(TEXTURE_WIDTH-TEXTURE_BORDER), yoffset<-TEXTURE_BORDER,
  109.      or (yoffset+interlacexheight)>(TEXTURE_HEIGHT-TEXTURE_BORDER).  Where
  110.      TEXTURE_WIDTH, TEXTURE_HEIGHT, and TEXTURE_BORDER are the state values of
  111.      the texture image being modified, and interlace is 1 if GGGGLLLL____IIIINNNNTTTTEEEERRRRLLLLAAAACCCCEEEE____SSSSGGGGIIIIXXXX
  112.      is disabled and 2 otherwise.  Note that TEXTURE_WIDTH and TEXTURE_HEIGHT
  113.      include twice the border width.
  114.  
  115.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _w_i_d_t_h or _h_e_i_g_h_t is negative.
  116.  
  117.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated when the texture array has not been
  118.      defined by a previous ffffggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee2222DDDD (or equivalent) operation.
  119.  
  120.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT is executed
  121.      between the execution of ffffggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of
  122.      ffffggggllllEEEEnnnndddd.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                                                                         PPPPaaaaggggeeee 2222
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137. ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT((((3333GGGG))))    OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee    ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT((((3333GGGG))))
  138.  
  139.  
  140.  
  141. ASSOCIATED GETS
  142.      ffffggggllllGGGGeeeettttTTTTeeeexxxxIIIImmmmaaaaggggeeee
  143.  
  144.  
  145. MMMMAAAACCCCHHHHIIIINNNNEEEE DDDDEEEEPPPPEEEENNNNDDDDEEEENNNNCCCCIIIIEEEESSSS
  146.      RealityEngine, RealityEngine2, and VTX systems do not support color
  147.      matrix transformations on images as they are loaded to or read back from
  148.      texture memory.
  149.  
  150.      RealityEngine, RealityEngine2, and VTX systems support
  151.      ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDD and ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT with the following
  152.      restrictions:
  153.  
  154.           1.  Only level 0 is supported; other levels result in a
  155.               GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE error.
  156.  
  157.           2.  The texel offsets and the dimensions of the subimage must be
  158.               multiples of 32; otherwise a GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE error is
  159.               generated.
  160.  
  161.           3.  If ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDD or ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT is used when
  162.               a GLX video source is the read drawable (see
  163.               ffffggggllllXXXXMMMMaaaakkkkeeeeCCCCuuuurrrrrrrreeeennnnttttRRRReeeeaaaaddddSSSSGGGGIIII), the X offset and Y offset must both be
  164.               0 and the subimage width must be 768; otherwise a
  165.               GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE error is generated.
  166.  
  167.           4.  GGGGLLLL____IIIINNNNTTTTEEEERRRRLLLLAAAACCCCEEEE____SSSSGGGGIIIIXXXX is not supported (see ffffggggllllEEEEnnnnaaaabbbblllleeee).
  168.  
  169.      On InfiniteReality systems, there is a performance benefit when the width
  170.      of the image to be transferred to texture memory is a multiple of 8.
  171.  
  172.      Texture borders are not supported on InfiniteReality systems.
  173.      Applications should use borderless textures and GGGGLLLL____CCCCLLLLAAAAMMMMPPPP____TTTTOOOO____EEEEDDDDGGGGEEEE____SSSSGGGGIIIISSSS
  174.      wrap mode.
  175.  
  176.      On High Impact and Maximum Impact systems, if the right side of the image
  177.      to be transferred to texture memory is not the right side of the texture,
  178.      then its index must be a multiple of 32, where index = xoffset+width.
  179.      Otherwise it will generate a GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE error.
  180.  
  181.      The SSSSGGGGIIIIXXXX____iiiinnnntttteeeerrrrllllaaaacccceeee extension is supported only on InfiniteReality
  182.      systems, on RealityEngine, RealityEngine2, and VTX systems, and on O2
  183.      systems.
  184.  
  185.      On O2 systems, when the current _r_e_a_d drawable is a DM pbuffer, using
  186.      ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDD or ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT to copy into a full
  187.      texture image whose dimensions and format match those of the pbuffer
  188.      causes a copy-by-reference.  This has performance advantages, especially
  189.      for video-generated DMbuffers, because it provides a DMA path for
  190.      updating textures.  Following the copy, rendering to the pbuffer or
  191.      otherwise modifying the DMbuffer, will directly affect texture memory.
  192.      However, this behavior is essentially an unspecified side-effect of the
  193.  
  194.  
  195.  
  196.                                                                         PPPPaaaaggggeeee 3333
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203. ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT((((3333GGGG))))    OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee    ffffggggllllCCCCooooppppyyyyTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT((((3333GGGG))))
  204.  
  205.  
  206.  
  207.      implementation on O2, and cannot be used on other systems.
  208.  
  209.  
  210. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  211.      ffffggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee2222DDDD, ffffggggllllTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT, ffffggggllllCCCCooooppppyyyyPPPPiiiixxxxeeeellllssss.
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.                                                                         PPPPaaaaggggeeee 4444
  263.  
  264.  
  265.  
  266.